package com.ybear.demo;

import android.app.Application;

import com.ybear.ybnetworkutil.network.NetworkChangeManage;
import com.ybear.ybnetworkutil.network.NetworkConfig;
import com.ybear.ybutils.utils.LogUtil;
import com.ybear.ybutils.utils.notification.NotificationX;

public class TestApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();

        NotificationX.get().init( this );

        NetworkConfig.get().setForegroundTitle( "网络服务运行中" );
//        NetworkConfig.get().setForegroundContent( "正在运行中" );

        /* 网络状态监听 */
        NetworkChangeManage ncm = NetworkChangeManage.get();
        ncm.init( this );
        ncm.registerNetworkChange((isAvailable, type) ->
                LogUtil.e("onNetworkChange -> isAvailable:" + isAvailable + " | type:" + type)
        );
    }
}
